package com.taoshen.entity;

import java.util.Date;

import lombok.*;
import lombok.experimental.Accessors;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

@Setter
@Getter
@ToString
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Document(collection="t_order")
public class Order {
	@Id
	@Indexed
	private String id;

	@Field("order_num")
	private String orderNum;

	@Field("name")
	private String name;

	@Field("crete_date")
	private Date createDate;

	// 映射忽略的字段，该字段不会保存到mongodb。
	@Transient
	private String cc;
}
